home *** CD-ROM | disk | FTP | other *** search
/ Fifty: Elektronik / FIFTY Elektronik (PS_Computer_Vertrieb).iso / ps8 / fty1017 / gepackt.exe / DISK2 / PLOTSRC.EXE / LIBMAN.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-11-10  |  15.8 KB  |  632 lines

  1. Unit LibMan;
  2.  
  3. interface
  4.  
  5. Uses Dos,StrTool,GEDDEFS,LibAcces;
  6.  
  7. Const MaxLIBTabSize=1280;
  8.  
  9. Procedure Init_LIBMan;
  10.  
  11. Procedure Set_UsedIDset(ID :Byte);
  12. {Markiere ID als benutzt }
  13.  
  14. Function Is_InUse(ID:Byte):Boolean;
  15. { Meldet, ob ID in Benutzung }
  16.  
  17. Procedure ResetUsedFLAG;
  18. {Setze Use_Flags zurück}
  19.  
  20. Function New_LIBIDNr:Byte;
  21. { Vergabe einer neuen ID-Nummer }
  22.  
  23. Function RecentInValidID:Byte;
  24. {Liefert nach Enter_To_LibLst ggf. ungültig gewordene ID zurück }
  25.  
  26. Function Enter_to_LibList(Var B:Bildelement):Integer;
  27. { Trägt Element in LIB-Descriptor-Tabelle ein
  28.   Result=-1 :ID schon anderweitig in Benutzung
  29.   Result=-2 :ID-Table voll
  30.   Result= 0 :unzulässiger Datentyp
  31.   Result> 0 :Platz in der ID-Tabelle}
  32.  
  33. Function IDFromName(N:Str15;Var Result:Integer):Byte;
  34. { Trägt LIB-Filename N  falls erforderlich mit neuer ID-Nummer }
  35. { in ID-Table ein }
  36.  
  37. Procedure Set_LIBID(Var Mac:Bildelement; ID :Byte);
  38. { Setzt LIB-ID eines Macros auf ID }
  39.  
  40. Procedure ClearLIBID(Var Mac:Bildelement);
  41. { Setzt LIB-ID eines Macros auf Null }
  42.  
  43. Function  Get_LIBID(Var Mac:Bildelement):Word;
  44. { Bestimmt LIB-ID eines Macros }
  45.  
  46. Function  LIBtableIDX(IDNr:Word):Word;
  47. { bestimmt Tabellen-Platz eines Lib-ID-Eintrages }
  48.  
  49. Function  LibFilename(IDNr:Word):Str15;
  50. { bestimmt Dateinnamen einer LIB-ID }
  51.  
  52. Procedure SetOldGeddyVersion(Old:Boolean);
  53. { Teilt der Unit mit, ob Datei alte GEDDY-Datei ist, Aufruf durch Ausgabe-Treiber}
  54.  
  55.  
  56. Function ScanforMac(Var Mac:Bildelement;
  57.                     Var SearchPath,           { Pfad wo Macro zu suchen ist }
  58.                         FileNAME   :PathStr;  { Name der Datei mit BLD-Daten}
  59.                     Var FilDate    :Longint;  { Datei-Datum des Macros      }
  60.                     Var Offset     :Longint;  { Seek-Offset (bei BLD =0     }
  61.                     Var RecCount   :Word):Boolean;{ Anzahl der Records      }
  62. { sucht nach Macro in Directory und allen LIB-Files dieses Directory }
  63.  
  64. Procedure UpdateMacroRec(Var Mac:Bildelement;
  65.                          Var SearchPath:PathStr);
  66. { Sucht nach Macro und setzt ggf. ID-Nr und ID-Table-Eintrag }
  67.  
  68.  
  69. Function  LocateMac(Mac:Bildelement;
  70.                     Var SearchPath,           { Pfad wo Macro zu suchen ist }
  71.                         FileNAME   :PathStr;  { Name der Datei mit BLD-Daten}
  72.                     Var FilDate    :Longint;  { Datei-Datum des Macros      }
  73.                     Var Offset     :Longint;  { Seek-Offset (bei BLD =0     }
  74.                     Var RecCount   :Word):    { Anzahl der Records          }
  75.                     Boolean;
  76.  
  77. { such Macro in Directory bzw. LIB-File }
  78.  
  79. Function LIBListSize:Word;
  80. { liefert Größe der LIB-Liste zurück }
  81.  
  82. Procedure Get_LibLstRec(Var E:Bildelement;Index:Word);
  83. { Eintrag(Index) der Lib-Liste zurück }
  84.  
  85. Procedure Rename_LibLst_Entry(L_name:Str15;Index:Word);
  86. { benennt Eintrag(Index) der Lib-Liste um}
  87.  
  88. Function LIBConCat(Lib,Sym:Str15):Str30;
  89. { Verbindet LIB-Dateinamen mit Symbol-Dateinnamen
  90.   z.B. SCHRAUBEN.LIB , IC14.BLD  ---> SCHRAUBEN.IC14
  91. }
  92.  
  93. Procedure LIBSplit(Sympfad:Str30;Var LIB,SYM:Str15);
  94. { spaltet SYMPFPAD auf :
  95.   SCHRAUBEN.IC14 wird zu SCHRAUBEN.LIB und IC14 }
  96.  
  97.  
  98. Procedure SetID_toStr(Var S:Str10;ID :Byte);
  99.  
  100. Function MACListStr(Mac:Bildelement):Str10;
  101. { Obj.Masterfile+#0+Chr(LibID-Nr) }
  102.  
  103. Function ID_FromMACListStr(Var S:Str10):Byte;
  104. { Umkehrfunktion }
  105.  
  106. Function PartIDEmpty(Var O:Bildelement):Boolean;
  107. { prüft ob der PartID-String eines Macros leer ist }
  108.  
  109. Function FullName_O(O:Bildelement):Str30;
  110.  
  111. Procedure  SaveLIBTable(Var Buffer);
  112. {rettet gesamte LIB-Table und Zustand nach
  113.  Buffer = ARRAY[1..MaxLibTabSize] of Byte und initiaslisiert Zustand}
  114.  
  115.  
  116. Procedure  RestoreLIBTable(Var Buffer);
  117. { speicher gesamte LIB-Table Information aus Buffer zurück
  118.  Buffer = ARRAY[1..MaxLibTabSize] of Byte }
  119.  
  120.  
  121. implementation
  122.  
  123. Const IsOldGEDDYFile:Boolean=false;
  124.       _RecentInvalidID :Byte=0;
  125.  
  126.       MaxLLIST =64;
  127.  
  128. Type  LLISTEntry=Record
  129.                    ID  :Byte;
  130.                    Name:String[14];
  131.                   end;
  132.       LIBLST    = Array[1..MaxLList] of LLISTEntry;{1024 - Byte }
  133.       IDset     = Set of 0..255;
  134.  
  135.       ID_InfoRec=Record   { gesamt 1059 Byte }
  136.                    NList   :Word;
  137.                    Used    :IDSet;
  138.                    OldGEDDY:Boolean;
  139.                    List    :LIBLST;
  140.                   end;
  141. Const
  142.       PLIBLST  : WORD  = 0;
  143.       Used_IDs : IDSet = [];
  144.  
  145. Var   LibListe : LIBLST;
  146.  
  147. Procedure Init_LIBMan;
  148. begin
  149.   PLIBLST  := 0;
  150.   Used_IDs := [];
  151. end;
  152.  
  153. Function New_LIBIDNr:Byte;
  154. {Vergabe einer neuen Nummer }
  155. Var I:Byte;
  156. begin
  157.   New_LIBIDNr:=0;
  158.   For I:=1 to 255 do
  159.     begin
  160.       If Not(I in Used_IDs) then
  161.         begin
  162.           New_LIBIDNr:=I;
  163.           Exit;
  164.         end;
  165.     end;
  166. end;
  167.  
  168. Procedure Set_UsedIDset(ID:Byte);assembler;
  169. asm
  170.   MOV BL,ID
  171.   OR  BL,BL
  172.   JZ  @@bypass
  173.   XOR BH,BH
  174.   MOV CL,BL
  175.   AND CL,7
  176.   SHR BX,1
  177.   SHR BX,1
  178.   SHR BX,1
  179.   MOV AL,1
  180.   SHL AL,CL
  181.   ADD BX,OFFSET Used_Ids
  182.   OR  [BX],AL
  183. @@bypass:
  184. end;
  185.  
  186.  
  187. Function Is_InUse(ID:Byte):Boolean;
  188. begin
  189.   Is_InUse:=ID in Used_IDs;
  190. end;
  191.  
  192.  
  193. Procedure ResetUsedFLAG;
  194. begin
  195.   Used_Ids:=[];
  196. end;
  197.  
  198. Procedure Clear_Lib_Table;
  199. begin
  200.   PLIBLST:=0;
  201. end;
  202.  
  203. Function RecentInValidID:Byte;
  204. begin
  205.   RecentInvalidID:=_RecentInvalidID;
  206. end;
  207.  
  208. Function Enter_to_LibList(Var B:Bildelement):Integer;
  209. Var I,J,K:Integer;
  210. begin
  211.   Enter_to_LibList:=0; { falscher Datentyp }
  212.   With ED_InfoTyp(B) do
  213.   begin
  214.     If ElementTyp<>ED_INFO then Exit;
  215.     IF TYP<>Container then Exit;
  216.     _RecentInvalidID:=0;
  217.     LibName:=UpcaseStr(LibName);
  218.     For I:=1 to PLibLst do
  219.      With LIBListe[I] do
  220.       begin
  221.         If Not Is_InUse(ID) then
  222.           begin
  223.             Enter_to_LibList:=I;
  224.             Name:=LibName;
  225.             _RecentInvalidID:=ID; { Diese ID wurde ungültig }
  226.             ID:=LibId; { auf Freiem Platz eingetragen }
  227.             {  Prüfe, ob selbe ID noch einmal vorkommt ? }
  228.             J:=Succ(I);
  229.             While J<=PlibLst do
  230.               begin
  231.                 { Wenn Ja , Dann Eintrag aus ID-Table entfernen }
  232.                 If LibID=LibListe[J].ID then
  233.                   begin
  234.                     Dec(PLibLst);
  235.                     For K:=J to Pliblst do
  236.                       Libliste[K]:=LibListe[K+1];
  237.                   end;
  238.                 Inc(J);
  239.               end;
  240.             Set_UsedIDSet(ID);
  241.             Exit;
  242.           end;
  243.         If (ID=LibID) or (Libname = Name)  then
  244.         begin
  245.           If (Libname = Name) and (ID=LibID) then
  246.             begin
  247.               Enter_to_LibList:=I;
  248.               Exit; { ID schon Eingetragen }
  249.             end;
  250.           Enter_to_libList:=-1; {ID schon für anderen Namen vergeben }
  251.           Exit; { Error }
  252.         end;
  253.       end;
  254.  
  255.  
  256.     If PlibLst<MaxLList then
  257.       begin
  258.          Inc(PlibLst);
  259.          Enter_to_LibList:=PlibLst;
  260.          With Libliste[PlibLst] Do
  261.           begin
  262.             Name:=LibName;
  263.             ID:=LibId;
  264.             Set_UsedIDSet(ID);
  265.           end;
  266.       end
  267.      else Enter_to_LibList:=-2; {ID-Liste voll }
  268.   end;
  269. end;
  270.  
  271. Function IDFromName(N:Str15;Var Result:Integer):Byte;
  272. Var I:Integer;
  273.     IDNr:Byte;
  274.     Info:Ed_InfoTyp;
  275. begin
  276.   IdNr:=0;
  277.   IDFromName:=0;
  278.   Result:=0;
  279.   _RecentInvalidID:=0;
  280.   If N='' then Exit;
  281.   N:=UpcaseStr(N);
  282.   For I:=1 to PLibLst do
  283.     With LibListe[I] Do If Name=N then
  284.        begin IDNr:=ID; Result:=I; end;
  285.   If IDNr=0 then
  286.     begin
  287.       IDNr:=New_LibIDNr;
  288.       Fillchar(Info,Sizeof(Info),0);
  289.       Info.Elementtyp:=Ed_Info;
  290.       Info.Typ:=Container;
  291.       Info.LibName:=N;
  292.       Info.LibID:=IDNr;
  293.       Result:=Enter_to_LibList(Bildelement(Info));
  294.       If Result<1 then IDNr:=0;
  295.     end;
  296.   IDfromName:=IdNr;
  297. end;
  298.  
  299. Function  Get_LIBID(Var Mac:Bildelement):Word;
  300. Var A,B :Byte;
  301. begin
  302.   With Mac Do
  303.   begin
  304.     A:=Byte(Masterfile[0]);  { High-Nibble}
  305.     B:=Byte(PartID[0]);      { Low -Nibble}
  306.     GET_LIBID:=(A and $F0) or ((B and $F0) shr 4);
  307.   end;
  308. end;
  309.  
  310. Procedure ClearLIBID(Var Mac:Bildelement);
  311. Var A,B :Byte;
  312. begin
  313.   With Mac Do
  314.   begin
  315.     Byte(Masterfile[0]):=Byte(Masterfile[0]) and $0F;
  316.     Byte(PartID[0]):=Byte(PartID[0]) and $0F;
  317.   end;
  318. end;
  319.  
  320. Procedure Set_LIBID(Var Mac:Bildelement; ID :Byte);
  321. Var A,B :Byte;
  322. begin
  323.   ClearLIBID(Mac);
  324.   With Mac Do
  325.   begin
  326.     Byte(Masterfile[0]):=Byte(Masterfile[0]) or (ID and $F0);
  327.     Byte(PartID[0]):=Byte(PartID[0]) or (ID shl 4);
  328.   end;
  329. end;
  330.  
  331. Function  LIBtableIDX(IDNr:Word):Word;
  332. { Liefert Position  in Dateinamentabelle zu einer ID-Nr }
  333. Var I:Word;
  334. begin
  335.   LibtableIDX:=0;
  336.   For I:=1 to PLIBLST do
  337.     With LIBListe[I] do
  338.       If IDNr=ID then
  339.          begin
  340.            LibTableIDX:=I;
  341.            Exit;
  342.          end;
  343. end;
  344.  
  345. Function  LibFilename(IDNr:Word):Str15;
  346. { bestimmt Dateinnamen einer LIB-ID }
  347. Var I:Word;
  348. begin
  349.   LibFileName:='';
  350.   I:=LibtableIdx(IdNr);
  351.   If I>0 then LibFileName:=LIBListe[I].Name;
  352. end;
  353.  
  354. Procedure SetOldGeddyVersion;
  355. begin
  356.   IsOldGeddyFile:=Old;
  357. end;
  358.  
  359. Function ScanforMac(Var Mac:Bildelement;
  360.                     Var SearchPath,           { Pfad wo Macro zu suchen ist }
  361.                         FileNAME   :PathStr;  { Name der Datei mit BLD-Daten}
  362.                     Var FilDate    :Longint;  { Datei-Datum des Macros      }
  363.                     Var Offset     :Longint;  { Seek-Offset (bei BLD =0     }
  364.                     Var RecCount   :Word):Boolean;{ Anzahl der Records      }
  365. Var SR    : SearchRec;
  366.     Entry : Dir_Entry;
  367. BEGIN
  368.   Inc(No_blink);
  369.   ScanForMac:=false;
  370.   FilDate:=0;
  371.   Offset:=0;       { In Normalem Macro wird Ab Rec 0 gelesen 0}
  372.   RecCount:=$FFFF; { bis Datei-Ende                           }
  373.   ClearLIBID(Mac);
  374.   Filename:=Mac.Masterfile+Dsuf;
  375.   Processfilename(SearchPath,Filename);
  376.   If FileExists(Filename) then
  377.     begin
  378.       ScanForMac:=true;
  379.       Dec(No_blink);
  380.       Exit;
  381.     end;
  382.   Filename:='*'+LIBsuf;
  383.   Processfilename(SearchPath,Filename);
  384.   FindFirst(Filename,Anyfile,SR);
  385.   While DosError=0 do
  386.     begin
  387.       If (SR.Attr and (Directory or VolumeID or SysFile))=0 then
  388.        begin
  389.          FileName:=SR.Name;
  390.          ProcessFilename(Searchpath,Filename);
  391.          If Find_in_Lib(Filename,Mac.Masterfile,Entry) then
  392.          With Entry do
  393.            begin
  394.              ScanforMac:=True;
  395.              FilDate:=Date;
  396.              Offset:=FileOffset;
  397.              RecCount:=NrOfRecs;
  398.              Dec(No_blink);
  399.              Exit;
  400.            end;
  401.        end; { If }
  402.       FindNext(SR);
  403.     end; { While }
  404.   Dec(No_blink);
  405. end;
  406.  
  407. Procedure UpdateMacroRec(Var Mac:Bildelement;
  408.                          Var SearchPath:PathStr);
  409. Var FName :PathStr;
  410.     N     :NameStr;
  411.     E     :ExtStr;
  412.     Date,
  413.     Offset:Longint;
  414.     Count :Word;
  415.     R     :Integer;
  416.     ID    :Byte;
  417. begin
  418.   If Get_LIBID(Mac)>0 then Exit;
  419.   If ScanforMac(Mac,Searchpath,Fname,Date,Offset,Count) and (Offset>0) then
  420.    begin
  421.      Fsplit(Fname,Fname,N,E);
  422.      Fname:=N+E;
  423.      ID:=IDFromName(Fname,R);
  424.      If (R>0) and (ID>0) then
  425.        Set_LIBID(Mac,ID);
  426.    end;
  427. end;
  428.  
  429. Function  LocateMac(Mac:Bildelement;
  430.                     Var SearchPath,           { Pfad wo Macro zu suchen ist }
  431.                         FileNAME   :PathStr;  { Name der Datei mit BLD-Daten}
  432.                     Var FilDate    :Longint;  { Datei-Datum des Macros      }
  433.                     Var Offset     :Longint;  { Seek-Offset (bei BLD =0     }
  434.                     Var RecCount   :Word):    { Anzahl der Records          }
  435.                     Boolean;
  436. Var ID    : Word;
  437.     Entry :Dir_Entry;
  438. BEGIN
  439.   LocateMac:=false;
  440.   Offset:=0;       { In Normalem Macro wird Ab Rec 0 gelesen }
  441.   RecCount:=$FFFF; { bis Datei-Ende                          }
  442.   FilDate:=0;
  443.   If IsOldGEDDYFile then
  444.      { Suchverfahren in alten GEDDY-Dateien }
  445.      LocateMac:=ScanForMac(Mac,Searchpath,Filename,FilDate,Offset,RecCount)
  446.   else
  447.   begin
  448.     ID:=Get_LIBID(Mac);
  449.     ClearLIBID(Mac);
  450.     If ID >0 then
  451.       begin
  452.         Filename:=LibFilename(ID);
  453.         ProcessFilename(Searchpath,Filename);
  454.         If Find_in_Lib(Filename,Mac.Masterfile,Entry) then
  455.             With Entry do
  456.              begin
  457.                Fildate:=Date;
  458.                Offset:=FileOffset;
  459.                RecCount:=NrOfRecs;
  460.                LocateMac:=True;
  461.                Exit;
  462.              end;
  463.       end else
  464.        begin
  465.          Filename:=Mac.Masterfile+Dsuf;
  466.          Processfilename(SearchPath,Filename);
  467.          LocateMac:=FileExists(Filename);
  468.        end;
  469.   end;
  470. END;
  471.  
  472. Function LIBListSize:Word;
  473. { liefert Größe der LIB-Liste zurück }
  474. begin
  475.   LibListSize:=PLIBlst;
  476. end;
  477.  
  478. Procedure Get_LibLstRec(Var E:Bildelement;Index:Word);
  479. { Eintrag(Index) der Lib-Liste zurück }
  480. begin
  481.   Fillchar(E,Sizeof(E),0);
  482.   With ED_InfoTyp(E),LibListe[Index] do
  483.   begin
  484.     EDVersion:=VersionCode;
  485.     Elementtyp:=ED_Info;
  486.     Typ:=Container;
  487.     LIBID:=Id;
  488.     LIBName:=Name;
  489.   end;
  490. end;
  491.  
  492. Procedure Rename_LibLst_Entry(L_name:Str15;Index:Word);
  493. { benennt Eintrag(Index) der Lib-Liste um}
  494. begin
  495.   With LibListe[Index] do
  496.   begin
  497.     Name:=L_Name;
  498.   end;
  499. end;
  500.  
  501. Function LIBConCat(Lib,Sym:Str15):Str30;
  502. Var P:Byte;
  503. begin
  504.   UpStr(Lib);
  505.   UpStr(Sym);
  506.   P:=Pos('.',SYM);
  507.   If (Sym<>'') and (P>1) then Byte(Sym[0]):=Pred(P);
  508.   P:=Pos('.',Lib);
  509.   If (LIB<>'') and (P>1) then
  510.     begin
  511.       Byte(Lib[0]):=P;
  512.       LibConCat:=Lib+Sym;
  513.     end
  514.   else LibConCat:=Sym;
  515. end;
  516.  
  517. Procedure LIBSplit(Sympfad:Str30;Var LIB,SYM:Str15);
  518. Var Punkt:Byte;
  519. begin
  520.   LIB[0]:=#0;
  521.   SYM[0]:=#0;
  522.   Punkt:=Pos('.',SymPfad);
  523.   If Punkt>0 then
  524.    begin
  525.      LIB:=Copy(Sympfad,1,Punkt-1);
  526.      LIB:=LIB+Libsuf;
  527.      SYM:=Copy(Sympfad,Punkt+1,Length(Sympfad)-Punkt);
  528.    end
  529.   else
  530.    begin
  531.      LIB:='';
  532.      SYM:=Sympfad;
  533.    end;
  534. end;
  535.  
  536. Function ID_FromMACListStr(Var S:Str10):Byte;
  537. Var L:Byte;
  538. begin
  539.   ID_FromMACListStr:=0;
  540.   L:=Byte(S[0]);
  541.   If (S[L-1]=#0) and (L>2) then
  542.     ID_FromMACListStr:=Byte(S[L]);
  543. end;
  544.  
  545. Procedure SetID_toStr(Var S:Str10;ID :Byte);
  546. begin
  547.   If (ID>0) and (S[0]<#9) then
  548.    begin
  549.      Inc(Byte(S[0]));
  550.      S[Byte(S[0])]:=#0;
  551.      Inc(Byte(S[0]));
  552.      S[Byte(S[0])]:=Char(ID);
  553.    end;
  554. end;
  555.  
  556. Function MACListStr(Mac:Bildelement):Str10;
  557. Var ID:Byte;
  558.     S :Str10;
  559. begin
  560.   MacListStr:='';
  561.   If Mac.ElementTyp<>Macro then exit;
  562.   ID:=Get_LIBID(Mac);
  563.   ClearLIBID(Mac);
  564.   S:=Mac.MasterFile;
  565.   SetID_ToStr(S,ID);
  566.   MaclistStr:=S;
  567. end;
  568.  
  569. Function PartIDEmpty(Var O:Bildelement):Boolean;
  570. begin
  571.   PartIDEmpty:=(Byte(O.PartID[0]) and $0F)=0;
  572. end;
  573.  
  574. Function FullName_O(O:Bildelement):Str30;
  575. Var Libname:Str30;
  576. begin
  577.   FullName_O:='';
  578.   If O.ElementTyp<>Macro then Exit;
  579.   LibName:=LibFilename(Get_LibID(O));
  580.   ClearLIBID(O);
  581.   LibName:=LibConCat(Libname,O.Masterfile);
  582.   Fullname_O:=Libname;
  583. end;
  584.  
  585. Procedure  SaveLIBTable(Var Buffer);
  586. begin
  587.   With ID_InfoRec(Buffer) do
  588.   begin
  589.     NList:=PlibLst;
  590.     Used:=Used_IDs;
  591.     OldGEDDY:=IsOldGEDDYFile;
  592.     List:=LibListe;
  593.   end;
  594. end;
  595.  
  596. Procedure  RestoreLIBTable(Var Buffer);
  597. begin
  598.   With ID_InfoRec(Buffer) do
  599.   begin
  600.     PlibLst:=Nlist;
  601.     Used_IDs:=Used;
  602.     IsOldGEDDYFile:=OldGeddy;
  603.     LibListe:=List;
  604.   end;
  605. end;
  606.  
  607.  
  608. {
  609.    3 verschiedene Aktionen
  610.    A:)  Macro aufrufen bei Bildaufbau
  611.           - ID-Bestimmen, Use_Flag dieser ID setzen
  612.             1.) Macro im RAM : Daten Lesen
  613.             2.) auf Datei
  614.                - LIB-Filename erkennen
  615.                - Daten Lesen und speichern
  616.  
  617.   B:) ID-Tabelle  Aufbauen beim Datei-Lesen
  618.        Objekt prüfen ob schon vorhanden und eintragen
  619.  
  620.   C:) ID-Tabelle ergänzen, wenn neues Macro aufgerufen wird
  621.        - neue ID Vergeben
  622.        - Dateinamen und ID in ID-Tabelle eintragen
  623.        - dabei nach ersten freiem (Use_Flag =) Eintrag suchen
  624.        - und Eintragen
  625.   D:) Datei Speichern :
  626.        Suche Nach benutzten ID-Tabelle Einträgen
  627.        und speichere den Eintrag
  628. }
  629.  
  630. end.
  631.  
  632.